package com.ruoyi.develop.goodsSalebuyall.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.develop.goodsSalebuyall.domain.GoodsSalebuyall;
import org.apache.ibatis.annotations.Param;

/**
 * 采购单合计Mapper接口
 * @author qh
 * @date 2024-08-09
 */
public interface GoodsSalebuyallMapper {
    /**
     * 查询采购单合计
     * @param id 采购单合计主键
     * @return 采购单合计
     */
    public GoodsSalebuyall selectById(String id);

    /**
     * 查询采购单合计列表
     * @param entity 采购单合计
     * @return 采购单合计集合
     */
    public List<GoodsSalebuyall> selectList(GoodsSalebuyall entity);

    public List<GoodsSalebuyall> selectMainId(String mainId);

    /**
     * 新增采购单合计
     * @param entity 采购单合计
     * @return 结果
     */
    public int insert(GoodsSalebuyall entity);

    /**
     * 修改采购单合计
     * @param entity 采购单合计
     * @return 结果
     */
    public int update(GoodsSalebuyall entity);

    public GoodsSalebuyall selectByPidCodeNameModelBrand(@Param("projectId")String projectId,@Param("goodsCode")String goodsCode,@Param("goodsName")String goodsName,@Param("goodModel")String goodModel,@Param("goodsBrand")String goodsBrand);

    public GoodsSalebuyall selectByGoodsId(@Param("goodsId")String goodsId);

    /**
     * 删除采购单合计
     * @param id 采购单合计主键
     * @return 结果
     */
    public int deleteById(String id);

    /**
     * 批量删除采购单合计
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteByIds(String[] ids);

    int getUnarrivedGoodsCount(GoodsSalebuyall entity);

    GoodsSalebuyall selectByGoodsIdAndBuyId(@Param("goodsId")String goodsId  , @Param("mainId")String mainId);

    GoodsSalebuyall selectByGoodsIdAndRemark(@Param("goodsId")String goodsId, @Param("remark")String remark,@Param("createBy")String createBy);

    void deleteByBuyId(String mainId);

    void replaceGoodsInfo(Map<String, Object> params);

}
